﻿namespace Digitalmes.Application.Mes.Masters.Materials;

/// <summary>
/// 物料 DTO 对象。
/// </summary>
public sealed class MdMaterialDto : Dto
{
    /// <summary>
    /// 物料代码
    /// </summary>
    [NotNull]
    public string? Code { get; set; }

    /// <summary>
    /// 物料名称
    /// </summary>
    [NotNull]
    public string? Name { get; set; }

    /// <summary>
    /// 物料类型（1->成品、2->半成品、3->原材料）
    /// </summary>
    public MaterialTypeEnum MaterialType { get; set; }

    /// <summary>
    /// 物料型号
    /// </summary>
    public string? Model { get; set; }

    /// <summary>
    /// 物料规格
    /// </summary>
    public string? Spec { get; set; }

    /// <summary>
    /// 计量单位
    /// </summary>
    public int Unit { get; set; }

    /// <summary>
    /// 条码校验规则集合。
    /// </summary>
    [NotNull]
    public List<string>? Rules { get; set; }

    /// <summary>
    /// 物料供应商
    /// </summary>
    public string? Supplier { get; set; }

    /// <summary>
    /// 是否检测（来料检验 IQC，0->不检验，1->检验）
    /// </summary>
    public int IsCheckIQC { get; set; }

    /// <summary>
    /// 生产日期
    /// </summary>
    public DateTime? ManufacturingDate { get; set; }

    /// <summary>
    /// 入库日期
    /// </summary>
    public DateTime? WarehousingDate { get; set; }

    /// <summary>
    /// 备注
    /// </summary>
    public string? Remark { get; set; }

    /// <summary>
    /// 启用状态（0->停用，1->启用）
    /// </summary>
    public EnabledStatusEnum Status { get; set; }

    public string? CreatedBy { get; set; }

    public DateTime CreatedTime { get; set; }

    public string? LastModifiedBy { get; set; }

    public DateTime? LastModifiedTime { get; set; }
}
